CC=g++
DLIBS=-lbcm2835
OBJS=../objs/
FONTS=../src/bcm2835/core/fonts/
CORE=../src/bcm2835/core/
IMG=../src/bcm2835/core/image/
TEST=../src/bcm2835/test/
CLOCK=../src/bcm2835/clock/
epd:main.o epd420RWS19A.o imagedata.o epdif.o font8.o font12.o font16.o font20.o font24.o font40.o epdpaint.o clock.o font48.o
	mkdir $(OBJS)
	$(CC) -Wall -o epd main.o epd420RWS19A.o imagedata.o epdif.o font8.o font12.o font16.o font20.o font24.o font40.o font48.o epdpaint.o clock.o $(DLIBS)
	mv epd main.o epd420RWS19A.o imagedata.o epdif.o font8.o font12.o font16.o font20.o font24.o font40.o font48.o epdpaint.o clock.o $(OBJS)
imagedata.o:$(IMG)imagedata.cpp $(IMG)imagedata.h 
	$(CC) -Wall -c $(IMG)imagedata.cpp $(DLIBS)
epd420RWS19A.o:$(CORE)epd420RWS19A.cpp $(CORE)epd420RWS19A.h
	$(CC) -Wall -c $(CORE)epd420RWS19A.cpp $(DLIBS) 
epdif.o:$(CORE)epdif.cpp $(CORE)epdif.h
	$(CC) -Wall -c $(CORE)epdif.cpp $(DLIBS) 
font8.o:$(FONTS)fonts.h $(FONTS)font8.c
	$(CC) -Wall -c $(FONTS)font8.c 
font12.o:$(FONTS)fonts.h $(FONTS)font12.c
	$(CC) -Wall -c $(FONTS)font12.c 
font16.o:$(FONTS)fonts.h $(FONTS)font16.c
	$(CC) -Wall -c $(FONTS)font16.c 
font20.o:$(FONTS)fonts.h $(FONTS)font20.c
	$(CC) -Wall -c $(FONTS)font20.c 
font24.o:$(FONTS)fonts.h $(FONTS)font24.c
	$(CC) -Wall -c $(FONTS)font24.c 
font40.o:$(FONTS)fonts.h $(FONTS)font40.c
	$(CC) -Wall -c $(FONTS)font40.c 
font48.o:$(FONTS)fonts.h $(FONTS)font48.c
	$(CC) -Wall -c $(FONTS)font48.c 
epdpaint.o:$(CORE)epdpaint.cpp $(CORE)epdpaint.h
	$(CC) -Wall -c $(CORE)epdpaint.cpp $(DLIBS) 
clock.o:$(CLOCK)clock.h $(CLOCK)clock.cpp
	$(CC) -Wall -c $(CLOCK)clock.cpp
main.o:$(TEST)main.cpp $(CORE)epd420RWS19A.h $(IMG)imagedata.h $(CORE)epdpaint.h $(CLOCK)clock.h
	$(CC) -Wall -c $(TEST)main.cpp $(DLIBS) 
clean:
	rm -rf $(OBJS)

